/*
        Firesoft 
        
    Copyright (C) 2010, Arttu Viljakainen 
    Published under GNU General Public License V3 
    (see http://www.gnu.org/licenses/licenses.html)
    
    This file is part of Firesoft.

    Firesoft is free software: 
    you can redistribute it and/or modify it under the terms of the GNU General 
    Public License as published by the Free Software Foundation, 
    either version 3 of the License, or (at your option) any later version.

    Firesoft is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 
    Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Tool for Path Finding Algorithm Testing. If not, see         
    <http://www.gnu.org/licenses/>.
 */
package softstarter.functionality;

public class RunnableItem {

	private String name;
	private String fullPath;
	private int matchingScore;
	
	public RunnableItem(String name, String fullPath) {
		this.name = name;
		this.fullPath = fullPath;
		matchingScore = 0;
	}

	public String getName() {
		return name;
	}

	public String getFullPath() {
		return fullPath;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	public void setFullPath(String fullPath) {
		this.fullPath = fullPath;
	}

	public void setMatchingScore(int matchingScore) {
		this.matchingScore = matchingScore;
	}
	public int getMatchingScore() {
		return matchingScore;
	}
	
	@Override
	public boolean equals(Object object) {
		RunnableItem obj = null;
		if(! (object instanceof RunnableItem)) 
			return false;
		else
			obj = (RunnableItem)object;
		
		if(obj.getFullPath().equalsIgnoreCase(fullPath) && 
				obj.getName().equalsIgnoreCase(name))
				return true;
		
		return false;
	}
	
	public String toString() {
		return name + " " + fullPath + " ";
	}

}
